#ifndef __DSHOT_H__
#define __DSHOT_H__
#include "stm32f4xx.h"

extern uint16_t Send_data_[16];
extern uint16_t Send_data1[16];
extern uint16_t Send_data2[16];
extern uint16_t Send_data3[16];
extern uint16_t Send_data4[16];

#define	Low_vol										 	7
#define	How_vol											14

#define Moto_DShotMax 	2000
#define Moto_DShotMin 	0


void motor1_send(uint16_t *motor);
void motor2_send(uint16_t *motor);
void motor3_send(uint16_t *motor);
void motor4_send(uint16_t *motor);
void pwmWriteDigital(uint16_t *esc_cmd, int value);

void TIM1_Motor_PWM_Init(void);
void Moto_DShot(int16_t MOTO1_DShot,int16_t MOTO2_DShot,int16_t MOTO3_DShot,int16_t MOTO4_DShot);
void DShot_esc_init(void);
#endif
